//数据去除重复值
function unique(array) {
	var ret = [], record = {}, it, tmp, obj = "__object__", bak = [], i, len;
	var type = {
		"number" : function(n) {
			return "__number__" + n;
		},
		"string" : function(n) {
			return "__string__" + n;
		},
		"boolean" : function(n) {
			return "__boolean__" + n;
		},
		"undefined" : function(n) {
			return "__undefined__";
		},
		"object" : function(n) {
			return n === null ? "__null__" : obj in n ? n[obj] : (n[obj] = obj
					+ bak.push(n));
		}
	};
	for (i = 0, len = array.length; i < len; i++) {
		it = array[i];
		tmp = type[typeof it](it);
		if (!(tmp in record)) {
			ret.push(it);
			record[tmp] = true;
		}
	}
	for (i = 0, len = bak.length; i < len; delete bak[i++][obj]) {
	}
	return ret;
};

//删除数组中指定值
Array.prototype.remove = function(val) {  
    var index = this.indexOf(val);  
    if (index > -1) {  
        this.splice(index, 1);  
    }  
};  